package com.musiklegal;

public class SongD
{
	String title, albumid,location, idRing;
	String  artist, album, genre, alname,label,albid,api,composer,pub;
	public String track_id;
	public String year;
	public String artist_id;
	public String preview;
	long downloaded;
	static final String delimiter="#";
	Boolean isplaying=false;
	
	SongD(String idring,String judul, String artisT ,String date,String lokasi, String alid,String genre,String composer,String publisher,String artistId)
	{
		isplaying=false;
		idRing = idring;
		title = judul;
		artist = artisT;
		albumid = alid;
		location =  lokasi;
		downloaded = (Long.parseLong(date));
		this.genre = genre;
		this.composer=composer;
		pub = publisher;
		artist_id = artistId;
	}
	SongD(String idring,String judul, String artisT ,long date,String lokasi, String alid,String genre,String composer,String publisher,String artistId)
	{
		idRing =idring;
		title = judul;
		artist = artisT;
		albumid = alid;
		location =  lokasi;
		downloaded = (date);
		isplaying=false;
		this.genre = genre;
		this.composer=composer;
		pub = publisher;
		artist_id = artistId;
	}
	
	public SongD() 
	{
		
	}
	public boolean equals(Object o)
	{
		SongD aSong = (SongD)o;
		
		if(aSong.idRing.compareTo(idRing)==0)
			return true;
		else
			return false;
	}
	
	public SongD clone()
	{
		SongD cloning = new SongD();
		
		cloning.idRing =idRing;
		cloning.title = title;
		cloning.artist = artist;
		cloning.albumid = albumid;
		cloning.location =  location;
		cloning.downloaded = downloaded;
		cloning.isplaying =isplaying;
		
		return cloning;
	}
	
	public String toString()
	{
		return idRing+delimiter+title+delimiter+artist+delimiter+downloaded+delimiter+location+delimiter+albumid+delimiter+genre+delimiter+composer+delimiter+pub+delimiter+artist_id;
	}

	

}
